<template>
  <div id="expertOneOnOne" class="main">
    <img src="@/assets/images/onbyon.png" alt="" />
    <div class="btn-box" @click="handleGoGoods">
      <el-button class="btn">购买服务</el-button>
      <div class="lighting"></div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const handleGoGoods = () => {
  router.push({
    path: '/shopserve',
  });
};
</script>

<style lang="scss" scoped>
.btn-box {
  text-align: center;
  height: 50px;
  .btn {
    height: 40px;
    width: 320px;
    background-color: var(--background-color);
    color: var(--text-color);
  }
  .lighting {
    width: 30px;
    height: 60px;
    position: relative;
    top: -55px;
    left: -80px;
    transform: rotate(15deg);
    -webkit-transform: rotate(15deg);
    -webkit-animation: lighting 1.5s linear infinite forwards;
    -moz-animation: lighting 1.5s linear infinite forwards;
    animation: lighting 1.5s linear infinite forwards;
    background: rgba(255, 255, 255, 0.4);
    z-index: 1;
  }
  @keyframes lighting {
    from {
      left: 0px; /* 起始位置 */
    }
    to {
      left: 100%; /* 结束位置，需根据实际情况调整偏移量 */
    }
  }
}
</style>
